package com.jvbc.xoso;




import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class AndroidTabLayoutActivity extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tab);
        
       
    	
        TabHost tabHost = getTabHost();
        
        tabHost.addTab(tabHost.newTabSpec("tinh")
                .setIndicator("Tinh", getResources().getDrawable(R.drawable.home))
                .setContent(new Intent(this, KetQuaActivity.class)));
        //don gian la may muon bao nhieu tab thi them cái nay 
        //the thi may cho no chay dau tien di
        //chay no rui an nut nao thi no goi cai activity nay ra la dc
        
        
        tabHost.addTab(tabHost.newTabSpec("vitri")
                .setIndicator("Vi Tri", getResources().getDrawable(R.drawable.action_search))
                .setContent(new Intent(this, SoiCauActivity.class)));
        
        tabHost.addTab(tabHost.newTabSpec("taxi")
                .setIndicator("Taxi", getResources().getDrawable(R.drawable.app_icon))
                .setContent(new Intent(this, KetQuaActivity.class)));
        
        tabHost.addTab(tabHost.newTabSpec("setting")
                .setIndicator("Setting", getResources().getDrawable(R.drawable.app_icon))
                .setContent(new Intent(this, KetQuaActivity.class)));
        
        tabHost.setCurrentTab(0); 
      
    }
}